import Vue from 'vue';
import App from './App';
import router from './router';
import 'ant-design-vue/dist/antd.css';
import Antd from 'ant-design-vue';
import Viser from 'viser-vue';
import axios from 'axios';
import '@/mock';
import store from '@/store';
import PouchDB from 'pouchdb';
// 引入基本css
import '@/assets/css/base.less';
// 引入awesome图标
import '@/assets/icon/icon.css';
import '@/assets/icon/font-awesome.css';
// 引入moment
import moment from 'moment';
import 'moment/locale/zh-cn';
import vueBus from 'vue-bus';
import constant from '@/libs/constant';
import { formRules } from '@/libs/options';
import enumOpts from '@/libs/enumOptions';
import utils from '@/libs/utils';

// axios.defaults.withCredentials = true;
Vue.prototype.$axios = axios;
Vue.prototype.$constant = constant;
Vue.prototype.$enum = enumOpts;
Vue.prototype.$utils = utils;

// 绑定自定义配置
Vue.prototype.$formRules = formRules;

Vue.config.productionTip = false;
Vue.use(Viser);
Vue.use(Antd);
Vue.use(vueBus);

moment.locale('zh-cn');

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>',
  mounted() {}
});
